package com.tmobile.phonebook.exceptions;

public class BusinessException extends Exception {

	private int errorCode;
	
	private BusinessException() {
		//hide this constructor from outside
		// make error passing mandatory
	}
	
	public BusinessException(int errorCode)
	{
		super(Errors.getErrorMessage(errorCode));
		this.errorCode = errorCode;
	}
	
	public int getErrorCode()
	{
		return errorCode;
	}
	
}
